package modelr

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Name string `gorm:"type:varchar(30)" json:"name"`
	Pass string `gorm:"type:varchar(50)" json:"pass"`
}
type Life struct {
	gorm.Model
	Title  string `gorm:"type:varchar(30)" json:"title"`
	Cont   string `gorm:"type:varchar(100)" json:"cont"`
	UserID int    `gorm:"type:int" json:"user_id"`
	User   User   `gorm:"foreignKey:UserID" json:"user"`
}
